/*
    This file is part of Epoch <http://code.google.com/p/epoch/>.

    Copyright (C) 2011 Adam Meily <meily.adam@gmail.com>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/


#include "Share.h"
// done

Share::Share()
{

}

Share::Share(const Share& other) : m_path(other.m_path), m_uuid(other.m_uuid),
                                   m_device(other.m_device),
                                   m_name(other.m_name), Model(other)
{
}

Share::Share(int id, const Device& device, const QByteArray& uuid,
             const QString& path, const QString name)
        : Model(id), m_device(device), m_uuid(uuid), m_path(path), m_name(name)
{
}


Share::~Share()
{

}

Share& Share::operator=(const Share& other)
{
    m_device = other.m_device;
    m_name = other.m_name;
    m_path = other.m_path;
    m_uuid = other.m_uuid;
    Model::operator=(other);
    
    return *this;
}

const RemoteDevice& Share::device() const
{
    return m_device;
}

void Share::name(const QString& name)
{
    m_name = name;
}

void Share::path(const QString& path)
{
    m_path = path;
}

const QString& Share::path() const
{
    return m_path;
}

const QString& Share::name() const
{
    return m_name;
}

const QByteArray& Share::uuid() const
{
    return m_uuid;
}

bool Share::isNull() const
{
    return m_uuid.isEmpty();
}
